<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

    <title></title>
    [#include "/admin/include/admin_static.htm"]
    [#import "/admin/include/admin_pagination.ftl" as p/]
    <script>
        //清空
        function resent() {
            var barNode = $(".search_table_div td");
            barNode.each(function () {
                $(this).find("input[type='text']").val("");
            });
            $("input[type=submit].btn_blue").click();
        }
    </script>

    <script type="text/javascript">
        $(function () {
            layui.use(['form', 'layer','upload','layedit'], function () {
                
            });
        });
    </script>

</head>
<body>
<div class="main_admin_content">
    <fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
        <legend>文章列表</legend>
    </fieldset>
<form id="searchForm" method="post" action="${path}/admin/article/list.aspx">
<table class="search_table_div">
    <tr>
        <td class="column">标题：</td>
        <td><input type="text" class="times" id="title" name="title"
                   value="${title }"/>
        </td>

        <td class="column">状态：</td>
        <td>

            <select name="status" id="status">
                <option
                [#if status==null]selected="selected"[/#if]
                value="">所有
                </option>
                <option
                [#if status==0]selected="selected"[/#if]
                value="0">隐藏
                </option>
                <option
                [#if status==1]selected="selected"[/#if]
                value="1">显示
                </option>
            </select>


        </td>
        <td class="column">类型：</td>
        <td>
            [@u.select list=newstypelist headerKey="不限" headerValue=" "  listKey="id" listValue="name" value="${type}"  id="type" name="type" /]
        </td>
        <td class="column">时间：</td>
        <td>
            <input type="text" name="issueDate_begin" value="${issueDate_begin}"
                   class="short" onclick="WdatePicker();" readonly="readonly"/>
            <i>至</i>
            <input type="text" onclick="WdatePicker();" name="issueDate_end" value="${issueDate_end}"
                   class="short"
                   readonly="readonly"/>
        </td>
    </tr>
    <tr>
        <th colspan="100" class="btn_td"><input name="submit"
                                                type="submit" class="layui-btn " value="查询"/> <input
                onclick="resent();" type="button"  class="layui-btn "
                value="清空"/></th>
    </tr>
</table>
</form>
    <a href="${path}/admin/article/add.aspx"  class="layui-btn " style="width: 100px; heigth: 30px; line-height: 30px" >添加</a>

    <table class="layui-table">
        <colgroup>
            <col width="50">
            <col width="80">
            <col width="80">
            <col width="80">
            <col width="80">
            <col width="80">
            <col width="80">
            <col width="80">
            <col width="80">
            <col width="80">
        </colgroup>
        <thead>
        <tr>
            <th>序号</th>
            <th>标题</th>

            <th>类型</th>
            <th>显示状态</th>
            <th>排序</th>
            <th>发布日期</th>
            <th>更新日期</th>
            <th>更新人员</th>
            <th>修改</th>
            <th>删除</th>
        </tr>
        </thead>
        [#list newsNoticeList as newsNotice]
            <tr>
                <td>${newsNotice_index+1}</td>
                <td>${newsNotice.title }</td>

                <td>
                ${p2p_get_category_name(newsNotice.type+"")!''}
                </td>
                <td>${(newsNotice.status==0)?string("隐藏","显示")}</td>
                <td>${newsNotice.orderid}</td>
                <td>
                    ${p2p_date_format(newsNotice.issueDate,"yyyy-MM-dd HH:mm:ss")}
                </td>
                <td>
                    ${p2p_date_format(newsNotice.updateTime,"yyyy-MM-dd HH:mm:ss")}
                </td>
                <td>${newsNotice.updatePerson }</td>
                <td>
                    <input type="button"
                           onclick="window.location.href='${path}/admin/article/add.aspx?id=${newsNotice.id }'"
                           value="修改"  class="layui-btn "/>
                </td>
                <td>
                    <input type="button"
                           onclick="window.location.href='${path}/admin/article/delete.aspx?id=${newsNotice.id }'"
                           value="删除"  class="layui-btn "/>
                </td>
            </tr>
        [/#list]
    </table>
    [@p.pager pager = page
    parameterMap={"title":"${title}","author":"${author }",
    "status":"${status}","type":"${type}","issueDate_begin":"${issueDate_begin}","issueDate_end":"${issueDate_end}"}
    url = "${path}/admin/article/list.aspx" /]
</div>
</body>
</html>